/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.ove.openmath.jome.ctrl.amto;

/**
 *
 * @author Mr.Sam
 */
import fr.ove.openmath.jome.ctrl.linear.events.LinearParserEvent;
import fr.ove.openmath.jome.ctrl.amto.MapsToUnary;

/**
* The root of the math object.
*
* @author © 1999 DIRAT Laurent
* @version 1.0  29/10/1999
*/
public class MathExpression extends MapsToUnary {
    /**
    * The constructor.
    */
    public MathExpression() {
        super("mathExpression", -1); // No specific token for the instance
    }
    
    /**
    * "Flushes" the object as a sequence of events for the building of the model
    */
    public void flush() {
        LinearParserEvent linearParserEvent = new LinearParserEvent(getEventSource());
        linearParserEvent.setToken(LinearParserEvent.START_EXPRESSION, null);
        fireLinearParserEvent(linearParserEvent);
        
        super.flush();
        
        linearParserEvent = new LinearParserEvent(getEventSource());
        linearParserEvent.setToken(LinearParserEvent.END_EXPRESSION, null);
        fireLinearParserEvent(linearParserEvent);
    }        
}